package com.fucius.study.crawler;

import com.fucius.study.crawler.service.CrawlerService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@ComponentScan("com.fucius")
@Configuration
public class CrawlerApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(CrawlerApplication.class);
        CrawlerService crawlerService = (CrawlerService)applicationContext.getBean("crawlerService");
        crawlerService.service1();
    }

}
